const Teacher = require('./teacher.js').Teacher;

function teacherTestNotNullKlass() {
    let teacher = new Teacher('Tom', 21, 2);
    let expectResult = 'My name is Tom. I am 21 years old. I am a Teacher. I teach Class 2.';
    if (teacher.introduce() === expectResult) {
        console.log('test passed');
    } else {
        console.log('test failed');
    }
}

function teacherTestNullKlass() {
    let teacher = new Teacher('Tom', 21);
    let expectResult = 'My name is Tom. I am 21 years old. I am a Teacher. I teach no Class.';
    if (teacher.introduce() === expectResult) {
        console.log('test passed');
    } else {
        console.log('test failed');
    }
}

teacherTestNotNullKlass();

teacherTestNullKlass();